﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;
using System.Runtime.Serialization;


namespace UniCT.LinkShareWpf.Interface
{
  
    [DataContract]
    public class ContentInfoTVS : ContentInfo
    {
        [DataMember]
        UInt32 episodNumber;
        [DataMember]
        UInt32 seasonNumber;
        [DataMember]
        string episodTitle;


        public ContentInfoTVS()
            : base()
        {

            episodNumber = 0;
            seasonNumber = 0;
            episodTitle = string.Empty;


        }
          
        public ContentInfoTVS(ContentInfo cinfo)
            : base(cinfo)
        {
            episodNumber = 0;
            seasonNumber = 0;
            episodTitle = string.Empty;
        }


        public String EpisodTitle
        {
            get { return episodTitle; }
            set
            {
                if (value != episodTitle)
                {
                    episodTitle = value;
                    this.OnPropertyChanged("EpisodTitle");
                }
            }
        }

        public UInt32 EpisodNumber
        {
            get { return episodNumber; }
            set
            {
                if (value > 0 && value != episodNumber)
                {
                    episodNumber = value;
                    this.OnPropertyChanged("EpisodNumber");
                }
            }
        }

        public UInt32 SeasonNumber
        {
            get { return seasonNumber; }
            set
            {
                if (value > 0 && value != seasonNumber)
                {
                    seasonNumber = value;
                    this.OnPropertyChanged("SeasonNumber");
                }
            }
        }

        public override string ToString()
        {
            string actors = String.Empty;
            foreach (string actor in base.Cast)
                actors += actor + ",";

            return string.Format("ContentInfoTVS: {0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10},{11}", base.Director, base.Title, base.Storyline, base.Genre, base.Language, base.SubTitleLanguage, base.Year, base.Duration, actors, episodNumber,episodTitle,seasonNumber);
        }
     



    }
}
